range(N,N,[N]):-!.
range(S,E,[S|T]):-
    S1 is S + 1,
    range(S1,E,T).